Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(server): unify the license headers #2438

Merged
merged 15 commits into from
Feb 7, 2024

Conversation

msgui
Copy link
Contributor

@msgui msgui commented Feb 1, 2024

Purpose of the PR

Main Changes

Verifying these changes

  • Trivial rework / code cleanup without any test coverage. (No Need)
  • Already covered by existing tests, such as (please modify tests here).
  • Need tests and can be verified as follows:
    • xxx

Does this PR potentially affect the following parts?

  • Nope
  • Dependencies (add/update license info)
  • Modify configurations
  • The public API
  • Other affects (typed here)

Documentation Status

  • Doc - TODO
  • Doc - Done
  • Doc - No Need

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. api Changes of API bug Something isn't working labels Feb 1, 2024
Copy link

codecov bot commented Feb 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1d4532c) 66.23% compared to head (9ed3749) 61.39%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2438      +/-   ##
============================================
- Coverage     66.23%   61.39%   -4.84%     
+ Complexity      828      488     -340     
============================================
  Files           511      511              
  Lines         42597    42598       +1     
  Branches       5942     5942              
============================================
- Hits          28215    26154    -2061     
- Misses        11566    13759    +2193     
+ Partials       2816     2685     -131     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@imbajin imbajin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fine, wonder to know all the files header are updated?

@msgui
Copy link
Contributor Author

msgui commented Feb 2, 2024

fine, wonder to know all the files header are updated?

This PR solely updates the license header in hg-server/hg-api.

@imbajin
Copy link
Member

imbajin commented Feb 2, 2024

fine, wonder to know all the files header are updated?

This PR solely updates the license header in hg-server/hg-api.

Get it, license header could update together (due to it is almost a completely repetitive task, just take a few samples for inspection and confirmation, no need to check them one by one)

@msgui msgui changed the title fix: Correct License HG-Server-API fix: Correct License HG-Server Feb 2, 2024
@msgui msgui requested a review from imbajin February 2, 2024 03:14
@VGalaxies
Copy link
Contributor

@msgui I noticed that some configuration files, such as hugegraph-server/hugegraph-test/src/main/resources/hugegraph.properties, do not have corresponding modified license headers. Is this expected?

@dosubot dosubot bot modified the milestones: 1.3.0, 1.5.0 Feb 2, 2024
@msgui msgui changed the title fix: Correct License HG-Server fix: correct License hg-server Feb 2, 2024
@msgui
Copy link
Contributor Author

msgui commented Feb 2, 2024

@msgui I noticed that some configuration files, such as hugegraph-server/hugegraph-test/src/main/resources/hugegraph.properties, do not have corresponding modified license headers. Is this expected?

thanks for the reminder

@msgui
Copy link
Contributor Author

msgui commented Feb 2, 2024

this commit includes files of all formats for easy review.
image
👉:47e2fe24976efe092fd6f944444be00ba142cba5

Copy link
Contributor

@VGalaxies VGalaxies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PTAL~

  1. It seems reasonable to consider updating the license header for the entire repository, not just under hugegraph-server.
  2. For the license headers only under hugegraph-server, there still seem to be some missed files. I have conducted a preliminary count (just a reminder):
    image
    (expected: 791, actual: 783)

@VGalaxies
Copy link
Contributor

Also, these extra blank lines here can be removed, it seems?
image
(compared to https://github.com/apache/incubator-hugegraph/wiki/HugeGraph-Code-Style-Guide)

@msgui msgui force-pushed the correct-listen-header branch from ec696fc to 3321852 Compare February 3, 2024 05:49
@msgui
Copy link
Contributor Author

msgui commented Feb 3, 2024

PTAL~

  1. It seems reasonable to consider updating the license header for the entire repository, not just under hugegraph-server.
  2. For the license headers only under hugegraph-server, there still seem to be some missed files. I have conducted a preliminary count (just a reminder):
    image
    (expected: 791, actual: 783)

Thank you for the reminder. The license header format in the remaining files is already correct, so no further corrections are needed

eg: hugegraph-server/Dockerfile

VGalaxies
VGalaxies previously approved these changes Feb 3, 2024
Copy link
Contributor

@VGalaxies VGalaxies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! I have performed verification locally following the steps in Project Migration/Package Name Change + IDEA Configuration Instructions (Complete Version), and it meets expectations.

@msgui Consider supplementing the detailed steps for updating copyright to the above document, explaining how to configure IDEA from scratch and how to update copyright with a single click (Because I encountered some unclear points during the configuration process, such as how to match the files that need updating, the relevant content in the above document is somewhat scattered. It might be beneficial to consolidate it together)

image

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 3, 2024
@VGalaxies
Copy link
Contributor

@imbajin could also check again~

Additionally, I believe that performing the license header check in the current CI (licence-checker.yml) seems somewhat delayed. It might be worth considering moving it to the verify stage. This way, developers can discover related errors earlier during local builds.

@imbajin
Copy link
Member

imbajin commented Feb 4, 2024

@imbajin could also check again~

Additionally, I believe that performing the license header check in the current CI (licence-checker.yml) seems somewhat delayed. It might be worth considering moving it to the verify stage. This way, developers can discover related errors earlier during local builds.

Good suggestion, could mark it as a TODO (enhance our CI to check/validate style problems)

@liuxiaocs7
Copy link
Member

This tool hawkeye may help license header check and format?

Copy link
Member

@imbajin imbajin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODOs:

  • keep the LICENSE header from refer code (revert/exclude it by reg?)
  • rearrange the commit range
  • keep the dist/*/bin/*.properties (user config files) clean (no need to add header here)
  • remove the header in org.apache.tinkerpop.gremlin.server.OpProcessor or GremlinPlugin (pure text file)

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Feb 5, 2024
@msgui msgui requested review from imbajin and VGalaxies February 6, 2024 04:36
Copy link
Contributor

@VGalaxies VGalaxies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

It seems that some files license headers are inconsistent with those in https://github.com/apache/incubator-hugegraph/wiki/HugeGraph-Code-Style-Guide.

TODOs:

  • keep the LICENSE header from refer code (revert/exclude it by reg?)
  • rearrange the commit range
  • keep the dist/*/bin/*.properties (user config files) clean (no need to add header here)
  • remove the header in org.apache.tinkerpop.gremlin.server.OpProcessor or GremlinPlugin (pure text file)

Also, do the TODOs here need to be addressed in this PR? @imbajin

imbajin
imbajin previously approved these changes Feb 6, 2024
Copy link
Member

@imbajin imbajin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost have checked all the files already (Also finished all the TODOS now)

@msgui msgui requested review from VGalaxies and imbajin February 6, 2024 11:03
Copy link
Contributor

@VGalaxies VGalaxies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM~

@imbajin imbajin changed the title fix: correct License hg-server fix(server): unify the license headers Feb 7, 2024
@imbajin imbajin merged commit 7586779 into apache:master Feb 7, 2024
20 of 21 checks passed
VGalaxies added a commit that referenced this pull request Feb 7, 2024
subtask of #2435

---------

Co-authored-by: imbajin <[email protected]>
Co-authored-by: VGalaxies <[email protected]>
returnToInnocence added a commit to msgui/incubator-hugegraph that referenced this pull request Feb 13, 2024
@VGalaxies
Copy link
Contributor

  • keep the dist/*/bin/*.properties (user config files) clean (no need to add header here)

@imbajin Is it only for cleaning the license header in properties files in user configuration files here? I found that some other user configuration files have license headers.

image

Also, do properties files in the conf-raft* directory need to have their license headers cleaned?

image

@imbajin
Copy link
Member

imbajin commented Mar 2, 2024

  • keep the dist/*/bin/*.properties (user config files) clean (no need to add header here)

@imbajin Is it only for cleaning the license header in properties files in user configuration files here? I found that some other user configuration files have license headers.

image

@VGalaxies
The current judgment points are:

  1. If a configuration file is not frequently used/modified by users, following ASF's suggestion may be better to add a file header to reduce disputes
  2. Otherwise(In HG), considering that there are already many configuration files and the content is relatively long, the commonly used configurations by users are not separately added to avoid affecting the user experience
  3. (like point 1) Configuration files from testing/and other modules could also add headers (although not required)

Also, do properties files in the conf-raft* directory need to have their license headers cleaned?

image

So these places seem to fit the 1st & 3rd points and can preserve license headers.

@msgui msgui deleted the correct-listen-header branch March 15, 2024 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Changes of API bug Something isn't working lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants